class Singer:

    def sing(self):
        print('正在唱歌')

    def dance(self):
        print('歌手正在跳舞')

class Dancer:

    def sing(self):
        print('舞者正在唱歌')

    def dance(self):
        print('正在跳舞')

class SingerDancer(Singer,Dancer):
    """多继承如果父类拥有相同的属性或者方法，默认使用前者的"""
    def __init__(self,name):
        self.name = name

    def sing(self):
        print(f'{self.name}正在唱歌')

    def dance(self):
        print(f'{self.name}正在跳舞')

p = SingerDancer('张三')
p.sing()
p.dance()